/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const basicinfoRouter = {
  path: '/views/basicInformation',
  component: Layout,
  //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
  redirect: 'noRedirect',
  // alwaysShow: true, //一直显示根路由
  name: 'basicInformation',
  meta: {
    title: '基本信息',
    icon: 'basicinfo',
    roles: ['admin', 'user']
  }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
  children: [
    {
      path: '/views/basicInformation/basicInfoData',
      component: () => import('@/views/basicInformation/basicInfoData/index'),
      //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
      redirect: 'noRedirect',
      // alwaysShow: true, //一直显示根路由
      meta: {
        title: '资料',
        roles: ['admin', 'user']
      }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
      children: [{
          path: '/views/basicInformation/basicInfoData/transactionCompanyInfo',
          component: () => import('@/views/basicInformation/basicInfoData/transactionCompanyInfo'), // 往来单位信息
          name: 'transactionCompanyInfo',
          meta: {
            title: '往来单位信息',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/basicInformation/basicInfoData/commodityInfo',
          component: () => import('@/views/basicInformation/basicInfoData/commodityInfo'), // 商品信息
          name: 'commodityInfo',
          meta: {
            title: '商品信息',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/basicInformation/basicInfoData/warehouseInfo',
          component: () => import('@/views/basicInformation/basicInfoData/warehouseInfo'), // 仓库信息
          name: 'warehouseInfo',
          meta: {
            title: '仓库信息',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/basicInformation/basicInfoData/staffInfo',
          component: () => import('@/views/basicInformation/basicInfoData/staffInfo'), // 员工信息
          name: 'staffInfo',
          meta: {
            title: '员工信息',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/basicInformation/basicInfoData/logisticsInfo',
          component: () => import('@/views/basicInformation/basicInfoData/logisticsInfo'), // 物流信息
          name: 'logisticsInfo',
          meta: {
            title: '物流信息',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/basicInformation/basicInfoData/accountInfo',
          component: () => import('@/views/basicInformation/basicInfoData/accountInfo'), // 账户信息
          name: 'accountInfo',
          meta: {
            title: '账户信息',
            roles: ['admin', 'user']
          }
        },
      ]
    },
    {
      path: '/views/basicInformation/beginningOfPeriod',
      component: () => import('@/views/basicInformation/beginningOfPeriod/index'),
      //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
      redirect: 'noRedirect',
      // alwaysShow: true, //一直显示根路由
      meta: {
        title: '期初',
        roles: ['admin', 'user']
      }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
      children: [{
          path: '/views/basicInformation/beginningOfPeriod/inventoryEntry',
          component: () => import('@/views/basicInformation/beginningOfPeriod/inventoryEntry'), // 期初库存录入
          name: 'inventoryEntry',
          meta: {
            title: '期初库存录入',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/basicInformation/beginningOfPeriod/arAndapEntry',
          component: () => import('@/views/basicInformation/beginningOfPeriod/arAndapEntry'), // 期初应收应付录入
          name: 'arAndapEntry',
          meta: {
            title: '期初应收应付录入',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/basicInformation/beginningOfPeriod/accountBalanceEntry',
          component: () => import('@/views/basicInformation/beginningOfPeriod/accountBalanceEntry'), // 期初账户余额录入
          name: 'accountBalanceEntry',
          meta: {
            title: '期初账户余额录入',
            roles: ['admin', 'user']
          }
        },
      ]
    },
    {
      path: '/views/basicInformation/basicInfoPrint',
      component: () => import('@/views/basicInformation/basicInfoPrint/index'),
      //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
      redirect: 'noRedirect',
      alwaysShow: true, //一直显示根路由
      meta: {
        title: '打印',
        roles: ['admin', 'user']
      }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
      children: [{
          path: '/views/basicInformation/basicInfoPrint/printSettings',
          component: () => import('@/views/basicInformation/basicInfoPrint/printSettings'),// 打印设置
          name: 'printSettings',
          meta: {
            title: '打印设置',
            roles: ['admin', 'user']
          }
        },
      ]
    },
  ]
}
export default basicinfoRouter
